<template>
  <div class="artists-page">
    <!-- Header Section -->
    <section class="artists-header" 
             :style="{ backgroundImage: `url(${require('../assets/img/subheader-2.jpg')})` }">
      <div class="overlay"></div>
      <div class="container">
        <div class="row">
          <div class="col-12 text-center">
            <h1 class="page-title" data-aos="fade-up">音乐艺术家</h1>
            <p class="page-subtitle" data-aos="fade-up" data-aos-delay="200">
              认识那些创造音乐魔法的天才们
            </p>
            <nav aria-label="breadcrumb" data-aos="fade-up" data-aos-delay="300">
              <ol class="breadcrumb justify-content-center">
                <li class="breadcrumb-item">
                  <router-link to="/" class="text-light">首页</router-link>
                </li>
                <li class="breadcrumb-item active text-light" aria-current="page">艺术家</li>
              </ol>
            </nav>
          </div>
        </div>
      </div>
    </section>

    <!-- Filter Section -->
    <section class="filter-section py-4">
      <div class="container">
        <div class="row align-items-center">
          <div class="col-md-6">
            <div class="search-box">
              <input 
                v-model="searchQuery"
                type="text" 
                class="form-control"
                placeholder="搜索艺术家..."
              >
              <i class="fas fa-search search-icon"></i>
            </div>
          </div>
          <div class="col-md-6">
            <div class="filter-controls">
              <select v-model="selectedGenre" class="form-select me-3">
                <option value="">所有类型</option>
                <option value="流行">流行</option>
                <option value="摇滚">摇滚</option>
                <option value="电子">电子</option>
                <option value="爵士">爵士</option>
                <option value="古典">古典</option>
              </select>
              <select v-model="sortBy" class="form-select">
                <option value="popular">最受欢迎</option>
                <option value="name">按名称</option>
                <option value="followers">粉丝数量</option>
                <option value="newest">最新加入</option>
              </select>
            </div>
          </div>
        </div>
      </div>
    </section>

    <!-- Featured Artist Hero -->
    <section class="featured-artist-hero py-5 gradient-bg" v-if="featuredArtist">
      <div class="container">
        <div class="row align-items-center">
          <div class="col-lg-6" data-aos="fade-right">
            <div class="featured-artist-image">
              <img :src="featuredArtist.image" :alt="featuredArtist.name" class="img-fluid rounded-3">
              <div class="play-overlay">
                <button class="featured-play-btn" @click="playArtist(featuredArtist)">
                  <i class="fas fa-play"></i>
                </button>
              </div>
            </div>
          </div>
          <div class="col-lg-6" data-aos="fade-left" data-aos-delay="200">
            <div class="featured-artist-info">
              <div class="artist-badge">本月推荐艺术家</div>
              <h2 class="featured-artist-name">{{ featuredArtist.name }}</h2>
              <p class="featured-artist-genre">{{ featuredArtist.genre }} · {{ featuredArtist.country }}</p>
              <p class="featured-artist-bio">{{ featuredArtist.bio }}</p>
              
              <div class="artist-stats-row">
                <div class="stat">
                  <div class="stat-number">{{ featuredArtist.followers }}</div>
                  <div class="stat-label">粉丝</div>
                </div>
                <div class="stat">
                  <div class="stat-number">{{ featuredArtist.tracks }}</div>
                  <div class="stat-label">曲目</div>
                </div>
                <div class="stat">
                  <div class="stat-number">{{ featuredArtist.albums }}</div>
                  <div class="stat-label">专辑</div>
                </div>
                <div class="stat">
                  <div class="stat-number">{{ featuredArtist.awards }}</div>
                  <div class="stat-label">奖项</div>
                </div>
              </div>
              
              <div class="featured-actions mt-4">
                <button class="btn btn-light btn-lg me-3">
                  <i class="fas fa-play me-2"></i>播放热门歌曲
                </button>
                <button class="btn btn-outline-light btn-lg me-3">
                  <i class="fas fa-heart me-2"></i>关注
                </button>
                <button class="btn btn-outline-light btn-lg">
                  <i class="fas fa-share me-2"></i>分享
                </button>
              </div>
            </div>
          </div>
        </div>
      </div>
    </section>

    <!-- Artists Introduction -->
    <section class="artists-intro py-5">
      <div class="container">
        <div class="row">
          <div class="col-lg-10 mx-auto" data-aos="fade-up">
            <div class="intro-content glass">
              <h2 class="intro-title text-center mb-4">遇见音乐的创造者</h2>
              <p class="intro-text text-center mb-5">
                每一位艺术家都有着独特的音乐故事，他们用旋律诠释生活，用歌声传递情感。
                从新兴的独立音乐人到享誉世界的殿堂级艺术家，在这里你将深入了解他们的音乐世界，
                感受创作背后的灵感与激情。
              </p>
              
              <div class="artist-categories">
                <div class="row">
                  <div v-for="(category, index) in artistCategories" :key="index" 
                       class="col-lg-4 col-md-6 mb-4" data-aos="zoom-in" :data-aos-delay="index * 100">
                    <div class="category-card">
                      <div class="category-icon">
                        <i :class="category.icon"></i>
                      </div>
                      <h4 class="category-title">{{ category.title }}</h4>
                      <p class="category-description">{{ category.description }}</p>
                      <div class="category-stats">
                        <span class="stat-number">{{ category.count }}+</span>
                        <span class="stat-label">位艺术家</span>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </section>

    <!-- Artists Grid -->
    <section class="artists-grid py-5">
      <div class="container">
        <div class="text-center mb-5" data-aos="fade-up">
          <h2 class="section-title">所有艺术家</h2>
          <p class="section-subtitle">发现更多优秀的音乐人</p>
        </div>
        
        <div v-if="filteredArtists.length === 0" class="text-center py-5">
          <div class="empty-state">
            <i class="fas fa-microphone-alt fa-4x text-muted mb-4"></i>
            <h4 class="text-muted mb-3">未找到匹配的艺术家</h4>
            <p class="text-muted mb-4">尝试调整搜索条件，或许能发现你感兴趣的音乐人</p>
            <button class="btn btn-outline-primary" @click="clearFilters">清除筛选条件</button>
          </div>
        </div>
        
        <div class="row">
          <div 
            v-for="(artist, index) in filteredArtists" 
            :key="index"
            class="col-xl-3 col-lg-4 col-md-6 col-sm-6 mb-4"
            data-aos="fade-up"
            :data-aos-delay="index * 50"
          >
            <div class="artist-card glass" @click="selectArtist(artist)">
              <div class="artist-image-container">
                <img :src="artist.image" :alt="artist.name" class="artist-image">
                <div class="artist-overlay">
                  <div class="overlay-content">
                    <button class="play-btn" @click.stop="playArtist(artist)">
                      <i class="fas fa-play"></i>
                    </button>
                    <div class="artist-actions mt-3">
                      <button class="action-btn" @click.stop="followArtist(artist)">
                        <i class="fas fa-heart" :class="{ 'text-danger': artist.isFollowing }"></i>
                      </button>
                      <button class="action-btn" @click.stop="shareArtist(artist)">
                        <i class="fas fa-share"></i>
                      </button>
                      <button class="action-btn" @click.stop="viewProfile(artist)">
                        <i class="fas fa-user"></i>
                      </button>
                    </div>
                  </div>
                </div>
                <div class="artist-verified" v-if="artist.verified">
                  <i class="fas fa-check-circle"></i>
                </div>
                <div class="artist-genre-tag">{{ artist.genre }}</div>
              </div>
              <div class="artist-info p-3">
                <h5 class="artist-name">{{ artist.name }}</h5>
                <p class="artist-location">
                  <i class="fas fa-map-marker-alt me-1"></i>{{ artist.country }}
                </p>
                <div class="artist-stats">
                  <div class="stat-item">
                    <i class="fas fa-users me-1"></i>{{ artist.followers }}
                  </div>
                  <div class="stat-item">
                    <i class="fas fa-music me-1"></i>{{ artist.tracks }}首
                  </div>
                </div>
                <div class="artist-popularity mt-2">
                  <div class="popularity-bar">
                    <div class="popularity-fill" 
                         :style="{ width: artist.popularity + '%' }"></div>
                  </div>
                  <span class="popularity-text">热度: {{ artist.popularity }}%</span>
                </div>
              </div>
            </div>
          </div>
        </div>
        
        <!-- Load More Button -->
        <div class="text-center mt-5" v-if="hasMoreArtists">
          <button class="btn btn-outline-primary btn-lg" @click="loadMoreArtists">
            加载更多艺术家
            <i class="fas fa-chevron-down ms-2"></i>
          </button>
        </div>
      </div>
    </section>

    <!-- Top Charts Section -->
    <section class="top-charts py-5 gradient-bg-2">
      <div class="container">
        <div class="text-center mb-5" data-aos="fade-up">
          <h2 class="section-title text-white">排行榜</h2>
          <p class="section-subtitle text-white">本周最受欢迎的艺术家</p>
        </div>
        
        <div class="row">
          <div class="col-lg-6" data-aos="fade-up">
            <div class="chart-card glass">
              <h4 class="chart-title text-white mb-4">
                <i class="fas fa-trophy me-2 text-warning"></i>热门艺术家
              </h4>
              <div class="chart-list">
                <div 
                  v-for="(artist, index) in topArtists" 
                  :key="index"
                  class="chart-item"
                >
                  <div class="rank">{{ index + 1 }}</div>
                  <div class="artist-thumb">
                    <img :src="artist.image" :alt="artist.name">
                  </div>
                  <div class="artist-details">
                    <div class="artist-name">{{ artist.name }}</div>
                    <div class="artist-genre">{{ artist.genre }}</div>
                  </div>
                  <div class="chart-stats">
                    <div class="followers">{{ artist.followers }}</div>
                    <div class="trend" :class="artist.trend">
                      <i :class="artist.trend === 'up' ? 'fas fa-arrow-up' : 'fas fa-arrow-down'"></i>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <div class="col-lg-6" data-aos="fade-up" data-aos-delay="200">
            <div class="chart-card glass">
              <h4 class="chart-title text-white mb-4">
                <i class="fas fa-fire me-2 text-danger"></i>新星崛起
              </h4>
              <div class="chart-list">
                <div 
                  v-for="(artist, index) in risingArtists" 
                  :key="index"
                  class="chart-item"
                >
                  <div class="rank">{{ index + 1 }}</div>
                  <div class="artist-thumb">
                    <img :src="artist.image" :alt="artist.name">
                  </div>
                  <div class="artist-details">
                    <div class="artist-name">{{ artist.name }}</div>
                    <div class="artist-genre">{{ artist.genre }}</div>
                  </div>
                  <div class="chart-stats">
                    <div class="growth">+{{ artist.growth }}%</div>
                    <div class="trend up">
                      <i class="fas fa-arrow-up"></i>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </section>

    <!-- Artist Detail Modal -->
    <div class="modal fade" id="artistModal" tabindex="-1" v-if="selectedArtist">
      <div class="modal-dialog modal-xl modal-dialog-centered">
        <div class="modal-content bg-dark text-white">
          <div class="modal-header border-0">
            <h5 class="modal-title">艺术家详情</h5>
            <button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"></button>
          </div>
          <div class="modal-body p-0">
            <div class="artist-detail-header" 
                 :style="{ backgroundImage: `url(${selectedArtist.coverImage || selectedArtist.image})` }">
              <div class="artist-detail-overlay"></div>
              <div class="container">
                <div class="row align-items-end" style="min-height: 300px;">
                  <div class="col-md-3">
                    <div class="artist-detail-thumb">
                      <img :src="selectedArtist.image" :alt="selectedArtist.name" class="rounded-circle">
                    </div>
                  </div>
                  <div class="col-md-9">
                    <div class="artist-detail-info">
                      <h2 class="artist-detail-name">{{ selectedArtist.name }}</h2>
                      <p class="artist-detail-genre">{{ selectedArtist.genre }} · {{ selectedArtist.country }}</p>
                      <div class="artist-detail-stats">
                        <span class="me-4"><i class="fas fa-users me-1"></i>{{ selectedArtist.followers }}</span>
                        <span class="me-4"><i class="fas fa-music me-1"></i>{{ selectedArtist.tracks }}首歌曲</span>
                        <span><i class="fas fa-compact-disc me-1"></i>{{ selectedArtist.albums }}张专辑</span>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <div class="artist-detail-content p-4">
              <div class="row">
                <div class="col-md-8">
                  <h5>关于艺术家</h5>
                  <p>{{ selectedArtist.bio }}</p>
                  
                  <h6 class="mt-4">热门歌曲</h6>
                  <div class="popular-tracks">
                    <div 
                      v-for="(track, index) in selectedArtist.popularTracks" 
                      :key="index"
                      class="track-item"
                    >
                      <div class="track-number">{{ index + 1 }}</div>
                      <div class="track-info">
                        <div class="track-title">{{ track.title }}</div>
                        <div class="track-plays">{{ track.plays }} 次播放</div>
                      </div>
                      <div class="track-duration">{{ track.duration }}</div>
                      <button class="play-track-btn" @click="playTrack(track)" title="播放歌曲">
                        <i class="fas fa-play"></i>
                      </button>
                    </div>
                  </div>
                </div>
                <div class="col-md-4">
                  <h6>社交媒体</h6>
                  <div class="social-links mb-4">
                    <a href="#" class="social-link"><i class="fab fa-spotify"></i></a>
                    <a href="#" class="social-link"><i class="fab fa-apple"></i></a>
                    <a href="#" class="social-link"><i class="fab fa-youtube"></i></a>
                    <a href="#" class="social-link"><i class="fab fa-instagram"></i></a>
                  </div>
                  
                  <h6>相似艺术家</h6>
                  <div class="similar-artists">
                    <div 
                      v-for="(similar, index) in selectedArtist.similarArtists" 
                      :key="index"
                      class="similar-artist"
                    >
                      <img :src="similar.image" :alt="similar.name" class="similar-thumb">
                      <span class="similar-name">{{ similar.name }}</span>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'Artists',
  data() {
    return {
      searchQuery: '',
      selectedGenre: '',
      sortBy: 'popular',
      selectedArtist: null,
      hasMoreArtists: true,
      currentPage: 1,
      featuredArtist: {
        name: '林晓音',
        genre: '流行音乐',
        country: '中国',
        image: require('../assets/img/artists/1.jpg'),
        followers: '2.3M',
        tracks: '45',
        albums: '8',
        awards: '12',
        bio: '林晓音是当代最具影响力的流行音乐艺术家之一，以其独特的音乐风格和深情的演唱而闻名。她的音乐融合了传统与现代元素，创造出令人难忘的旋律。',
        popularTracks: [
          { title: '星空下的承诺', plays: '12.5M', duration: '3:42' },
          { title: '城市夜晚', plays: '8.9M', duration: '4:15' },
          { title: '回忆如歌', plays: '7.2M', duration: '3:58' }
        ],
        similarArtists: [
          { name: '梦想歌手', image: require('../assets/img/artists/2.jpg') },
          { name: '都市声音', image: require('../assets/img/artists/3.jpg') }
        ]
      },
      artistCategories: [
        {
          title: '流行歌手',
          icon: 'fas fa-star',
          description: '当代流行音乐的代表人物，用旋律传达现代人的情感和生活体验，深受大众喜爱',
          count: 1500
        },
        {
          title: '摇滚音乐人',
          icon: 'fas fa-guitar',
          description: '以电吉他和强烈节拍为特色，传递叛逆与激情的音乐精神，展现独特的艺术态度',
          count: 800
        },
        {
          title: '民谣歌手',
          icon: 'fas fa-feather-alt',
          description: '用简洁真挚的旋律述说生活故事，以朴素的情感打动每一颗渴望宁静的心灵',
          count: 650
        },
        {
          title: '电子音乐人',
          icon: 'fas fa-headphones',
          description: '运用现代科技创造未来音响，在电子节拍中探索音乐的无限可能性',
          count: 450
        },
        {
          title: '爵士艺术家',
          icon: 'fas fa-saxophone-alt',
          description: '传承经典爵士传统，以即兴演奏和复杂和声展现音乐的深度与技巧',
          count: 300
        },
        {
          title: '说唱歌手',
          icon: 'fas fa-microphone-alt',
          description: '用节奏与韵律表达社会观察，以独特的说唱技巧传达真实的生活态度',
          count: 700
        }
      ],
      artists: [
        {
          name: '林晓音',
          genre: '流行',
          country: '中国',
          image: require('../assets/img/artists/1.jpg'),
          followers: '2.3M',
          tracks: 45,
          albums: 8,
          popularity: 95,
          verified: true,
          isFollowing: false,
          bio: '当代流行音乐的领军人物，以其独特的音乐风格征服了无数听众。'
        },
        {
          name: '摇滚之王',
          genre: '摇滚',
          country: '美国',
          image: require('../assets/img/artists/2.jpg'),
          followers: '1.8M',
          tracks: 67,
          albums: 12,
          popularity: 88,
          verified: true,
          isFollowing: false,
          bio: '摇滚乐界的传奇人物，用音乐诠释着青春与激情。'
        },
        {
          name: '爵士女神',
          genre: '爵士',
          country: '法国',
          image: require('../assets/img/artists/3.jpg'),
          followers: '1.2M',
          tracks: 34,
          albums: 6,
          popularity: 82,
          verified: true,
          isFollowing: true,
          bio: '爵士乐的现代诠释者，用声音讲述着优雅的故事。'
        },
        {
          name: '电子先锋',
          genre: '电子',
          country: '德国',
          image: require('../assets/img/artists/4.jpg'),
          followers: '3.1M',
          tracks: 89,
          albums: 15,
          popularity: 92,
          verified: true,
          isFollowing: false,
          bio: '电子音乐的创新者，引领着数字音乐的未来。'
        },
        {
          name: '民谣诗人',
          genre: '民谣',
          country: '英国',
          image: require('../assets/img/artists/5.jpg'),
          followers: '956K',
          tracks: 28,
          albums: 4,
          popularity: 75,
          verified: false,
          isFollowing: false,
          bio: '用吉他和歌声编织着生活的诗篇。'
        },
        {
          name: '古典大师',
          genre: '古典',
          country: '奥地利',
          image: require('../assets/img/artists/6.jpg'),
          followers: '687K',
          tracks: 156,
          albums: 25,
          popularity: 78,
          verified: true,
          isFollowing: false,
          bio: '古典音乐的现代演绎者，传承着音乐的永恒之美。'
        },
        {
          name: '说唱新星',
          genre: '说唱',
          country: '中国',
          image: require('../assets/img/artists/7.jpg'),
          followers: '1.4M',
          tracks: 52,
          albums: 7,
          popularity: 86,
          verified: false,
          isFollowing: true,
          bio: '用说唱讲述着当代年轻人的故事和梦想。'
        },
        {
          name: 'R&B女王',
          genre: 'R&B',
          country: '美国',
          image: require('../assets/img/artists/8.jpg'),
          followers: '2.7M',
          tracks: 73,
          albums: 11,
          popularity: 90,
          verified: true,
          isFollowing: false,
          bio: 'R&B音乐的灵魂歌者，用声音传递着情感的力量。'
        }
      ],
      topArtists: [
        { name: '林晓音', genre: '流行', image: require('../assets/img/artists/round/1.jpg'), followers: '2.3M', trend: 'up' },
        { name: '电子先锋', genre: '电子', image: require('../assets/img/artists/round/2.jpg'), followers: '3.1M', trend: 'up' },
        { name: 'R&B女王', genre: 'R&B', image: require('../assets/img/artists/round/3.jpg'), followers: '2.7M', trend: 'down' },
        { name: '摇滚之王', genre: '摇滚', image: require('../assets/img/artists/round/4.jpg'), followers: '1.8M', trend: 'up' },
        { name: '说唱新星', genre: '说唱', image: require('../assets/img/artists/round/5.jpg'), followers: '1.4M', trend: 'up' }
      ],
      risingArtists: [
        { name: '新晋歌手', genre: '流行', image: require('../assets/img/artists/round/6.jpg'), growth: 150 },
        { name: '独立音乐人', genre: '独立', image: require('../assets/img/artists/round/7.jpg'), growth: 125 },
        { name: '创作才子', genre: '创作', image: require('../assets/img/artists/round/8.jpg'), growth: 98 },
        { name: '实验先锋', genre: '实验', image: require('../assets/img/artists/round/1.png'), growth: 87 },
        { name: '跨界艺术家', genre: '跨界', image: require('../assets/img/artists/round/2.png'), growth: 76 }
      ]
    }
  },
  computed: {
    filteredArtists() {
      let filtered = this.artists

      // Search filter
      if (this.searchQuery) {
        filtered = filtered.filter(artist => 
          artist.name.toLowerCase().includes(this.searchQuery.toLowerCase()) ||
          artist.genre.toLowerCase().includes(this.searchQuery.toLowerCase()) ||
          artist.country.toLowerCase().includes(this.searchQuery.toLowerCase())
        )
      }

      // Genre filter
      if (this.selectedGenre) {
        filtered = filtered.filter(artist => artist.genre === this.selectedGenre)
      }

      // Sort
      switch (this.sortBy) {
        case 'name':
          filtered = filtered.sort((a, b) => a.name.localeCompare(b.name))
          break
        case 'followers':
          filtered = filtered.sort((a, b) => {
            const aFollowers = parseFloat(a.followers.replace(/[KM]/g, '')) * (a.followers.includes('M') ? 1000 : 1)
            const bFollowers = parseFloat(b.followers.replace(/[KM]/g, '')) * (b.followers.includes('M') ? 1000 : 1)
            return bFollowers - aFollowers
          })
          break
        case 'newest':
          filtered = filtered.sort((a, b) => a.name.localeCompare(b.name)) // 示例排序
          break
        default: // popular
          filtered = filtered.sort((a, b) => b.popularity - a.popularity)
      }

      return filtered
    }
  },
  methods: {
    selectArtist(artist) {
      this.selectedArtist = {
        ...artist,
        popularTracks: [
          { title: '热门歌曲1', plays: '10.2M', duration: '3:45' },
          { title: '热门歌曲2', plays: '8.7M', duration: '4:12' },
          { title: '热门歌曲3', plays: '6.1M', duration: '3:28' }
        ],
        similarArtists: [
          { name: '相似艺术家1', image: require('../assets/img/artists/round/1.jpg') },
          { name: '相似艺术家2', image: require('../assets/img/artists/round/2.jpg') }
        ]
      }
      const { Modal } = require('bootstrap')
      const modal = new Modal(document.getElementById('artistModal'))
      modal.show()
    },
    playArtist(artist) {
      console.log('Playing artist:', artist.name)
      // Implement play functionality
    },
    followArtist(artist) {
      artist.isFollowing = !artist.isFollowing
      console.log('Follow status changed:', artist.name, artist.isFollowing)
      // Implement follow functionality
    },
    shareArtist(artist) {
      console.log('Sharing artist:', artist.name)
      // Implement share functionality
    },
    viewProfile(artist) {
      this.selectArtist(artist)
    },
    loadMoreArtists() {
      this.currentPage++
      // In a real app, load more artists from API
      if (this.currentPage >= 3) {
        this.hasMoreArtists = false
      }
    },
    clearFilters() {
      this.searchQuery = ''
      this.selectedGenre = ''
      this.sortBy = 'popularity'
    },
    
    playTrack(track) {
      // 调用全局音乐播放器播放歌曲
      if (window.musicPlayer) {
        const songData = {
          title: track.title,
          artist: this.selectedArtist.name,
          album: this.selectedArtist.name + ' - 热门歌曲',
          src: require('../assets/Håll om mig - Nanne.mp3'), // 由于只有一个音频文件，都播放这个
          cover: this.selectedArtist.image
        }
        window.musicPlayer.playNewSong(songData)
      }
    }
  }
}
</script>

<style scoped>
/* Header Styles */
.artists-header {
  height: 400px;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  align-items: center;
  position: relative;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
}

.page-title {
  font-size: 3.5rem;
  font-weight: 800;
  color: white;
  margin-bottom: 1rem;
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-subtitle {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 2rem;
}

/* Filter Section */
.filter-section {
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.search-box {
  position: relative;
}

.search-box .form-control {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding-right: 50px;
  border-radius: 25px;
}

.search-box .form-control::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.search-icon {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.6);
}

.filter-controls {
  display: flex;
  justify-content: flex-end;
}

.filter-controls .form-select {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  width: auto;
  min-width: 150px;
}

.filter-controls .form-select option {
  background: #2d2d2d;
  color: white;
}

/* Featured Artist Hero */
.featured-artist-image {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
}

.play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.featured-artist-image:hover .play-overlay {
  opacity: 1;
}

.featured-play-btn {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
  border: none;
  color: white;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.featured-play-btn:hover {
  transform: scale(1.1);
}

.artist-badge {
  display: inline-block;
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.featured-artist-name {
  font-size: 3rem;
  font-weight: 800;
  color: white;
  margin-bottom: 0.5rem;
}

.featured-artist-genre {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1rem;
}

.featured-artist-bio {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.artist-stats-row {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
}

.stat {
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: bold;
  color: white;
}

.stat-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Artist Cards */
.artist-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  height: 100%;
}

.artist-card:hover {
  transform: translateY(-10px);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.artist-image-container {
  position: relative;
  overflow: hidden;
}

.artist-image {
  width: 100%;
  height: 280px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.artist-card:hover .artist-image {
  transform: scale(1.05);
}

.artist-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.artist-card:hover .artist-overlay {
  opacity: 1;
}

.overlay-content {
  text-align: center;
}

.play-btn {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
  border: none;
  color: white;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  margin: 0 auto;
}

.play-btn:hover {
  transform: scale(1.1);
}

.artist-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.action-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.artist-verified {
  position: absolute;
  top: 15px;
  right: 15px;
  color: #1da1f2;
  font-size: 1.5rem;
}

.artist-genre-tag {
  position: absolute;
  bottom: 15px;
  left: 15px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 0.8rem;
}

.artist-name {
  color: white;
  font-weight: 600;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.artist-location {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.artist-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 1rem;
}

.artist-popularity {
  margin-top: 1rem;
}

.popularity-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.popularity-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff6b6b, #4ecdc4);
  transition: width 0.3s ease;
}

.popularity-text {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
}

/* Chart Cards */
.chart-card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 2rem;
  height: 100%;
}

.chart-title {
  font-size: 1.3rem;
  font-weight: 600;
}

.chart-item {
  display: flex;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chart-item:last-child {
  border-bottom: none;
}

.rank {
  width: 30px;
  font-size: 1.2rem;
  font-weight: bold;
  color: #4ecdc4;
}

.artist-thumb {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;
  margin-right: 1rem;
}

.artist-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.artist-details {
  flex: 1;
}

.artist-details .artist-name {
  font-size: 1rem;
  font-weight: 600;
  color: white;
  margin-bottom: 0.25rem;
}

.artist-details .artist-genre {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
}

.chart-stats {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}

.followers,
.growth {
  font-size: 0.9rem;
  font-weight: 600;
  color: white;
}

.trend {
  font-size: 0.8rem;
}

.trend.up {
  color: #28a745;
}

.trend.down {
  color: #dc3545;
}

/* Modal Styles */
.artist-detail-header {
  height: 300px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.artist-detail-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
}

.artist-detail-thumb {
  width: 150px;
  height: 150px;
  position: relative;
  z-index: 2;
}

.artist-detail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.artist-detail-info {
  position: relative;
  z-index: 2;
  padding-left: 2rem;
}

.artist-detail-name {
  font-size: 2.5rem;
  font-weight: 800;
  color: white;
  margin-bottom: 0.5rem;
}

.artist-detail-genre {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1rem;
}

.artist-detail-stats {
  color: rgba(255, 255, 255, 0.9);
}

.popular-tracks {
  margin-top: 1rem;
}

.track-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.track-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 0.75rem 1rem;
}

.track-number {
  width: 30px;
  color: rgba(255, 255, 255, 0.6);
}

.track-info {
  flex: 1;
  margin-left: 1rem;
}

.track-title {
  color: white;
  font-weight: 500;
}

.track-plays {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
}

.track-duration {
  color: rgba(255, 255, 255, 0.6);
  margin-right: 15px;
}

.play-track-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6b6b, #4ecdc4);
  border: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0;
  transform: scale(0.8);
}

.track-item:hover .play-track-btn {
  opacity: 1;
  transform: scale(1);
}

.play-track-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.play-track-btn:active {
  transform: scale(0.95);
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-link:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #4ecdc4;
}

.similar-artists {
  margin-top: 1rem;
}

.similar-artist {
  display: flex;
  align-items: center;
  padding: 0.5rem 0;
}

.similar-thumb {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 1rem;
}

.similar-name {
  color: white;
  font-size: 0.9rem;
}

/* Section Titles */
.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.7);
}

/* Responsive */
@media (max-width: 768px) {
  .page-title {
    font-size: 2.5rem;
  }
  
  .featured-artist-name {
    font-size: 2rem;
  }
  
  .artist-stats-row {
    flex-wrap: wrap;
    gap: 1rem;
  }
  
  .filter-controls {
    margin-top: 1rem;
    justify-content: flex-start;
  }
  
  .artist-image {
    height: 220px;
  }
}

/* Artists Introduction */
.intro-content {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 3rem;
}

.intro-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, #ff6b6b, #4ecdc4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.intro-text {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.7;
}

.category-card {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  height: 100%;
}

.category-card:hover {
  background: rgba(0, 0, 0, 0.7);
  transform: translateY(-10px);
  border-color: rgba(78, 205, 196, 0.5);
}

.category-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #ff6b6b, #4ecdc4);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
  color: white;
}

.category-title {
  color: white;
  font-weight: 600;
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.category-description {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.category-stats {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1rem;
}

.category-stats .stat-number {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: #4ecdc4;
  margin-bottom: 0.25rem;
}

.category-stats .stat-label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

/* Enhanced Empty State */
.empty-state {
  max-width: 400px;
  margin: 0 auto;
}

.empty-state .fa-microphone-alt {
  animation: pulse 2s infinite;
  opacity: 0.5;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.8; }
}

/* Responsive adjustments for intro */
@media (max-width: 768px) {
  .intro-content {
    padding: 2rem;
  }
  
  .intro-title {
    font-size: 2rem;
  }
  
  .category-card {
    padding: 1.5rem;
  }
}
</style>
